<template>
	<view class="app-container justify-center">
		<view class="p-40">
			<u-button v-if="isShowLaunchButton" type="primary" text="无响应？点击返回登录"></u-button>
		</view>
	</view>
</template>

<script setup>
	import { onShow, onHide } from "@dcloudio/uni-app";
	import { useUserStore } from "@/store/user.js";
	import { ref } from "vue";

	const userStore = useUserStore();

	let timer = null;

	const isShowLaunchButton = ref(false);

	onShow(() => {
		console.log(userStore.isLogin);
		if (userStore.isLogin) {
			uni.reLaunch({
				url: "/pages/index/index",
			});
		} else {
			uni.reLaunch({
				url: "/pages/login/login",
			});
		}
	});

	onHide(() => {});
</script>

<style lang="scss"></style>
